package com.gprinter.utils;

import android.content.Context;
import android.content.pm.PackageManager;
import android.support.v4.content.ContextCompat;

/**
 * Created by Lee on 2018/7/2.
 */

public class PermissionUtils {

    public static final int PHONE_STATE_CODE = 0x05;

    public static boolean checkPermission(Context context,String permission) {
        int check = ContextCompat.checkSelfPermission(context, permission);
        if (check == PackageManager.PERMISSION_GRANTED) {
            return true;
        }
        return false;
    }

}
